package MyJson;

import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * Created by yangluhua on 2016/8/20 0020.
 */
public class JsonTest {
    public static void main(String[] args) {
         Company company = new Company("Changtu","星火路",5);
        // YSON yson = new JsonUtil();
        // yson.parse(company);
        Class clazz = company.getClass();
        try {
            Method method = clazz.getMethod("queryUser", String.class,int.class);
            Object obj = method.invoke(company, "yang", 26);
            System.out.println(obj);
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
    }
}
